-- GENERATED SPELL FOR [Rezznik] --


function spell0_16054(pUnit, Event) --@Dark Iron Bomb,n/a--
pUnit:FullCastSpellOnTarget(19784,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16054', 5000, 1)
end

function spell1_16054(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16054', 558, 1)
end

function spell2_16054(pUnit, Event) --@Explosive Sheep,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(8209,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_16054', 1, 1)
end

function spell3_16054(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(27603,pUnit)
pUnit:RegisterEvent('Sorts_16054', 8000, 1)
end

function spell4_16054(pUnit, Event) --@Recombobulate,n/a--
pUnit:FullCastSpellOnTarget(27677,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16054', 670, 1)
end

function Sorts_16054(pUnit, Event)
local choix_sorts_16054 = math.random(0, 4)
if choix_sorts_16054 == 0 then
pUnit:RegisterEvent('spell0_16054', 1, 1)
end
if choix_sorts_16054 == 1 then
pUnit:RegisterEvent('spell1_16054', 1, 1)
end
if choix_sorts_16054 == 2 then
pUnit:RegisterEvent('spell2_16054', 1, 1)
end
if choix_sorts_16054 == 3 then
pUnit:RegisterEvent('spell3_16054', 1, 1)
end
if choix_sorts_16054 == 4 then
pUnit:RegisterEvent('spell4_16054', 1, 1)
end
end

function mob16054_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16054', math.random(1500, 3000), 1)
end

function mob16054_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16054_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16054_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16054, 1, 'mob16054_Action')
RegisterUnitEvent(16054, 2, 'mob16054_Leave')
RegisterUnitEvent(16054, 3, 'mob16054_Kill')
RegisterUnitEvent(16054, 4, 'mob16054_Die')
